package com.xpu.stock.job;

import com.xpu.stock.service.StockTimeTaskService;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 定义配置xxljob执行任务的bean对象
 */
@Component
public class StockTimerJob {
    @Autowired
    private StockTimeTaskService stockTimeTaskService;

    /**
     * 采集大盘数据
     */
    @XxlJob("getInnerMarketInfos")
    public void getInnerMarketInfos(){
        stockTimeTaskService.collectInnerMarketInfo();
    }
    @XxlJob("getAshareInfos")
    public  void getAshareInfos(){
        stockTimeTaskService.collectAShareInfo();
    }
    @XxlJob("testXxlJob")
    public void testXxlJob(){
        System.out.println("textXxlJob run.....");
    }
}
